package com.wangshang.serve.po;

import java.util.Date;

/**
 * AbstractServiceDespairId entity provides the base persistence definition of
 * the ServiceDespairId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractServiceDespairId implements java.io.Serializable {

	// Fields

	private Integer serviceId;
	private String userIdentify;
	private String saySomething;
	private Date date;

	// Constructors

	/** default constructor */
	public AbstractServiceDespairId() {
	}

	/** minimal constructor */
	public AbstractServiceDespairId(Integer serviceId, Date date) {
		this.serviceId = serviceId;
		this.date = date;
	}

	/** full constructor */
	public AbstractServiceDespairId(Integer serviceId, String userIdentify,
			String saySomething, Date date) {
		this.serviceId = serviceId;
		this.userIdentify = userIdentify;
		this.saySomething = saySomething;
		this.date = date;
	}

	// Property accessors

	public Integer getServiceId() {
		return this.serviceId;
	}

	public void setServiceId(Integer serviceId) {
		this.serviceId = serviceId;
	}

	public String getUserIdentify() {
		return this.userIdentify;
	}

	public void setUserIdentify(String userIdentify) {
		this.userIdentify = userIdentify;
	}

	public String getSaySomething() {
		return this.saySomething;
	}

	public void setSaySomething(String saySomething) {
		this.saySomething = saySomething;
	}

	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractServiceDespairId))
			return false;
		AbstractServiceDespairId castOther = (AbstractServiceDespairId) other;

		return ((this.getServiceId() == castOther.getServiceId()) || (this
				.getServiceId() != null
				&& castOther.getServiceId() != null && this.getServiceId()
				.equals(castOther.getServiceId())))
				&& ((this.getUserIdentify() == castOther.getUserIdentify()) || (this
						.getUserIdentify() != null
						&& castOther.getUserIdentify() != null && this
						.getUserIdentify().equals(castOther.getUserIdentify())))
				&& ((this.getSaySomething() == castOther.getSaySomething()) || (this
						.getSaySomething() != null
						&& castOther.getSaySomething() != null && this
						.getSaySomething().equals(castOther.getSaySomething())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getServiceId() == null ? 0 : this.getServiceId().hashCode());
		result = 37
				* result
				+ (getUserIdentify() == null ? 0 : this.getUserIdentify()
						.hashCode());
		result = 37
				* result
				+ (getSaySomething() == null ? 0 : this.getSaySomething()
						.hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		return result;
	}

}